home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Environments / Oberon⁄F™ 1.2 / Preinstalled version / Tour (.txt) < prev   
Encoding:
Oberon Document  |  1996-07-08  |  26.3 KB  |  265 lines  |  [oODC/obnF]

  1. Documents.StdDocumentDesc
  2. Documents.DocumentDesc
  3. Containers.ViewDesc
  4. Views.ViewDesc
  5. Stores.StoreDesc
  6. Documents.ModelDesc
  7. Containers.ModelDesc
  8. Models.ModelDesc
  9. Stores.ElemDesc
  10. TextViews.StdViewDesc
  11. TextViews.ViewDesc
  12. TextModels.StdModelDesc
  13. TextModels.ModelDesc
  14. TextModels.AttributesDesc
  15. Helvetica
  16. TextRulers.StdRulerDesc
  17. TextRulers.RulerDesc
  18. TextRulers.StdStyleDesc
  19. TextRulers.StyleDesc
  20. TextRulers.AttributesDesc
  21. Helvetica
  22. StdLogos.ViewDesc
  23. Helvetica
  24. Helvetica
  25. Helvetica
  26. Helvetica
  27. Helvetica
  28. Helvetica
  29. HostPictures.StdViewDesc
  30. UUUUUU
  31. 33ff33
  32. !  !!
  33. QUQ#!!#
  34. 22022
  35. S#!#0
  36. 334#D$C$#D$!
  37. D2B2$B
  38. 3AC"#D$BC#D##$A
  39. DCB4DF
  40. 22B42C24$234T
  41.  !!##!
  42. UQUUQUU
  43. 3##30
  44. $DFBDd#F$#DB
  45. DD331
  46. f6f6cf0
  47. U32230
  48. 33"2"2
  49. dB4d2IDF
  50. 3    B24B21
  51. c#!!`
  52. fc! !!
  53. ((22#30
  54. 3#3#C$1
  55. 3#$#C$dC$df
  56. #JDC#$C#C
  57. ffb""8
  58. 3B42DBD$1
  59. DB42$BdDD
  60. 2JBB4
  61. D    B2B22B22A1
  62. "&#USS#US
  63. #C$C(c)DBDLDC
  64. #DJC$JA
  65. eUf56f
  66. fFD2B6B6
  67. D2iiIDFIfDDi
  68. Djffj*F
  69. #313!/
  70. fdaaIAA
  71. f&bBiI&
  72. EEJJ#C$
  73. / !!/
  74. Vfc3S6
  75. haifID
  76. iffiFf
  77. I*EaB
  78. hffkk
  79. kfiiffi
  80. iffif
  81. ifiiF
  82. ffdfDf
  83. Ffjfjf
  84. JDj22?
  85. #f#c#cc#!/
  86. ffiif
  87. ifFff
  88. 6f6ff
  89. f    iffidf
  90. 2260f
  91. hhfhh
  92. 6f6f6f6f6622
  93. f6f6f3cc## 
  94. #&ffc#&`
  95. 6f6f6f626
  96. 6ff6b26f`
  97. ffkfkii
  98. f6fcc#c
  99. &f6f6
  100. kfmfk
  101. 6f6f6
  102. #6f6f6
  103. fiffF
  104. f6f6f662
  105. kfkf`h
  106. fhfn(hkff
  107. fkkff`
  108. fiDfif
  109. *j**h
  110. dhddHk
  111. dKMKII
  112. hhkfh
  113. ffmfk
  114. ffFDF
  115. hfhff
  116. hfhfh
  117. ffmf`
  118. ffkfh
  119. fhkff
  120. fdDf`
  121. fhfhff
  122. fbDDK
  123. k$dd`
  124. N))ff`
  125. U5330
  126. UU330
  127. 35SU5S
  128. 35U5SU55US3
  129. 553SUU0
  130. 5U5USS0
  131. SUUSU5UU
  132. USSU5U30
  133. 35SSU5U1
  134. 33SU5
  135. 3SUUS
  136. SUS30
  137. 5U5SUUSUUSU"
  138. SUS33
  139. 5USS330
  140. SU530
  141. 3U335
  142. S33UU5
  143. 5SS3SUU55SU5US
  144. U5SU5UU530
  145. 3SUSS
  146. 33UU5
  147. SUSS33
  148. S    USUS3S35UU
  149. SU33U5SU5
  150. SUU5UU5
  151. QQ33U
  152. Geneva
  153. Geneva
  154. MODULE ObxHello0;
  155.     IMPORT Out;
  156.     PROCEDURE Do*;
  157.     BEGIN
  158.         Out.String("Hello World"); Out.Ln
  159.     END Do;
  160. END ObxHello0.
  161. TextControllers.StdCtrlDesc
  162. TextControllers.ControllerDesc
  163. Containers.ControllerDesc
  164. Controllers.ControllerDesc
  165. Geneva
  166. DevCommanders.StdViewDesc
  167. DevCommanders.ViewDesc
  168. Helvetica
  169. Helvetica
  170. MODULE ObxHello0;
  171.     IMPORT Out0;
  172.     PROCEDURE Do*;
  173.     BEGIN
  174.         Out.String("Hello World"); Out.Ln
  175.     END Do;
  176. END ObxHello0.
  177. Geneva
  178. Helvetica
  179. Helvetica
  180. MODULE ObxAdr;
  181.     IMPORT Views, Dialog, TextModels, TextMappers, TextViews;
  182.         adr*: RECORD (Dialog.Interactor)
  183.             name*:    ARRAY 64 OF CHAR;
  184.             email*:    ARRAY 64 OF CHAR;
  185.             customerID*:    LONGINT;
  186.             getsUpdates*:    BOOLEAN;
  187.             Text*:    PROCEDURE
  188.         END;
  189.     PROCEDURE Text;
  190.         VAR t: TextModels.Model; f: TextMappers.Formatter; v: Views.View;
  191.     BEGIN
  192.         t := TextModels.dir.New();
  193.         f.ConnectTo(t);
  194.         f.WriteString(adr.name); f.WriteString(", "); f.WriteString(adr.email); f.WriteLn;
  195.         f.WriteString("Customer ID "); f.WriteInt(adr.customerID);
  196.         IF adr.getsUpdates THEN f.WriteString(" - gets updates") END;
  197.         f.WriteLn;
  198.         v := TextViews.dir.New(t);
  199.         Views.OpenView(v);
  200.         adr.name := ""; adr.email := ""; adr.customerID := 0; adr.getsUpdates := FALSE;
  201.         Dialog.Update(adr)
  202.     END Text;
  203. BEGIN
  204.     adr.Text := Text
  205. END ObxAdr.
  206. Geneva
  207. Helvetica
  208.  Oberon/F
  209.     Mac OS
  210.     Guided Tour
  211.     2.96
  212. Guided Demonstration of Oberon/F for Mac OS, Release 1.2.
  213. About this Tour
  214. This text is a quick introduction to Oberon/F. Read it and follow the small hands
  215. on examples to get a feeling for the way how Oberon/F works.
  216. Oberon/F
  217. Oberon/F is a cross-platform component framework. Currently, versions for Windows 3.1/95/NT and Mac OS 7 are available; other versions are planned. Oberon/F source code and data files are completely portable. Oberon/F fully adheres to the underlying platform's user interface; i.e. on a Macintosh it is a genuine Mac application, and on Windows it is a true Windows application. Still, full access to the underlying platform is possible when desired; e.g. access to Windows DLLs, or to Macintosh toolbox calls and code fragments.
  218. Oberon/F is a cross-platform component framework. Oberon/F is designed to simplify creation and integration of software components. A software component may provide a particular kind of service, e.g. a spelling checker, or it may be an editor that can be embedded in a document, e.g. a spreadsheet object. Oberon/F components can be be freely mixed and matched by the end-user, in order to customize his or her working environment. Oberon components can work together with other components, e.g. OLE2 objects or OpenDoc parts (forthcoming).
  219. Oberon/F is a cross-platform component framework. It provides a number of extensible programming interfaces. These interfaces are much simpler and safer, and platform-independent moreover, than basic Windows or Mac OS routines. The framework is extensible. It is always possible to create new components that implement the same interfaces as other existing components, or which even add new interfaces themselves.
  220. Oberon/F is also an integrated development environment for the programming language Oberon. Since the development environment Oberon/F is identical to the production run
  221. time environment Oberon/F, rapid development (RAD) is possible. The language Oberon is component-oriented, i.e. it simplifies the creation and integration of software components. Technically speaking, component-orientation means that a languages supports essential features of object-oriented programming, plus type safety, garbage collection, and dynamic linking.
  222. Being a direct descendant of Pascal and Modula
  223. 2, Oberon is easy to learn and to teach and programs are easy to read. Oberon is simple enough to serve as a scripting language, yet powerful enough to enable system
  224. level programming: Oberon/F itself is entirely written in Oberon. The Oberon compiler produces fast, native, 32-bit code.
  225. Now let's have a look at some standard Oberon/F components. Views are the most interesting components; they can be put into documents or other views. Views can be edited and resized in place. This demo text contains several embedded views. Here is a first one: a picture view without editing capabilities; it can be resized by first clicking into the picture and then dragging the displayed resize handles. Resizing constraints are resolved on the fly: in the example, the picture view always stays in proportion.
  226.     A picture view as an example of an
  227.     embedded document component
  228. The Oberon/F framework supports drag & drop editing. To copy, hold down the option key when starting to drag.
  229. Almost all operations in Oberon/F are subject to a multi
  230. level undo/redo feature. In fact, the framework makes it so easy to program something in an undoable fashion that it is almost more involved not to do so.
  231. Program Development
  232. The following embedded component is a fully editable text, showing the complete source of a small Oberon module. To compile the module, focus the embedded part by clicking into it (e.g. click on the keyword PROCEDURE), and then execute Compile from menu Dev.
  233. ObxHello0 is a minimal "hello world" program in Oberon. It writes a single line to the system log text. Execute Open
  234. Log from menu Info to display the system log, if it is not open already.
  235. Exported items in Oberon modules are marked by a trailing asterisk; there are no separate header files, definition modules, or the like. Consistency of interfaces and implementations is fully checked by the compiler; version integrity is checked by the dynamic linker.
  236. Module ObxHello0 exports a single command Do. Commands are Oberon procedures that can be called by the user; i.e. they can be executed directly from the user interface. There is no need for a central top
  237. level module or a "main" procedure. A command can be added to a menu, attached to a button, or executed directly from within a text. To do the latter, the name of the command must be preceded by the name of the implementing module:
  238.  ObxHello0.Do
  239. To execute a command by name, simply select the command string and invoke Execute from menu Dev. Another possibility is to precede the command name with a special embedded component, called a commander 
  240.  that can be inserted anywhere into a text using Insert
  241. Commander from menu Tools. Clicking on a commander executes the appropriate command.
  242. If the source contains errors detectable by the compiler, these are flagged directly in the text. For example, the following module version erroneously imports the (non
  243. existing) module Out0, instead of Out. Try to compile the module - the compiler inserts special embedded components, error markers, flagging the errors that it found. The compiler also writes a report to the system log.
  244. By clicking on an error marker, it is expanded to display a short error message. Correct the mistake (delete the superfluous 0 in IMPORT Out0), and compile again. The marker disappears, and the module is compiled successfully.
  245. The set of currently loaded modules can be inspected using Loaded
  246. Modules from menu Info. The interfaces of modules (loaded or not) can be displayed using the browser: select a module name and execute Interface from menu Info.
  247. A module remains loaded until it is explicitly unloaded, or until Oberon/F is restarted. To unload a module, select the module name and execute Unload
  248. Module
  249. List from menu Dev. For example, unload ObxHello0, modify the string "Hello world", recompile ObxHello0, and activate ObxHello0.Do again. Note that your changes do not affect the running system until after you have unloaded the old module. Such an explicit unloading is a very useful mechanism to allow major changes in multiple modules, while still using and working with the previous version.
  250. Linking Programs to Forms
  251. Besides the text and programming subsystems, the standard Oberon/F configuration also comes with a form subsystem, including a visual designer. Forms are e.g. data entry masks or dialog boxes.
  252. The following module defines a simple record variable to be used for a data entry form.
  253. After compiling the module, a dialog box can be created for the variable ObxAdr.adr using command New
  254. Form... from menu Dev. Just enter the name of the exported global variable ObxAdr.adr into the link field, and click on the Create button. The type information extracted by the compiler is available to Oberon/F at run-time, which is used to automatically create a data-entry window for the form, with a simple default layout.
  255. The created layout can be edited, and then opened as a dialog using the Open as Aux Dialog command in menu Dev.
  256. The text entry fields and the checkbox are directly linked to the fields name, email, and getsUpdates of the variable ObxAdr.adr. The button is linked to the field Text, a procedure variable initialized to refer to procedure Text in module ObxAdr. Clicking the button causes procedure Text to be called. In turn, a new text is created, a report based on the variable adr is written to the text, a new text view is created, and used to open a window displaying the report. Next, the dialog variable is cleared and the system is notified that the variable has changed, causing the form's display to resynchronize with the changed variable.
  257. Text entry fields, checkboxes, and other so-called controls have properties that can be inspected and modified by a suitable control property inspector. Instead of first writing a module and then creating an initial layout, the form can be constructed first, and the corresponding module written later. An Oberon/F dialog box does not necessarily correspond to exactly one record variable. The individual controls of a dialog box may be linked to records in different modules, and a dialog box may also contain other views which are not controls, e.g. pictures.
  258. A form can be saved from within the visual editor; thereafter it can be attached to a menu entry, or another dialog's button. Dialogs are saved in the standard document format, and in a platform
  259. independent way.
  260. And more ...
  261. After this first impression, you may want to consult your documentation for an in-depth coverage of Oberon/F. Select the Oberon/F
  262. Help item in the Help menu (the icon with the question mark) for an overview over the documentation. From there, the complete on-line documentation can be reached via hyperlinks.
  263. Geneva
  264. Documents.ControllerDesc
  265.